package com.medical.manage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.medical.common.core.domain.Result;
import com.medical.manage.domain.Order;
import com.medical.manage.domain.vo.DoctorVo;
import com.medical.manage.domain.vo.OrderVo;
import com.medical.manage.mapper.OrderMapper;
import com.medical.manage.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @BelongsProject: medical
 * @BelongsPackage: com.medical.manage.service.impl
 * @Author: szw
 * @CreateTime: 2025-03-17  20:04
 * @Description: TODO
 * @Version: 1.0
 */

@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
    @Autowired
    private OrderMapper orderMapper;

    /**
     * 订单
     * @return
     */
    @Override
    public Result<List<OrderVo>> getOrder() {
        List<OrderVo> list=orderMapper.getOrder();
        return Result.success(list);
    }

    /**
     * 医生信息
     * @param doctorId
     * @return
     */
    @Override
    public Result<DoctorVo> getDoctorDetail(Integer doctorId) {
        DoctorVo doctorVo=orderMapper.getDoctorDetail(doctorId);
        return Result.success(doctorVo);
    }
}
